plistutil: preserve binary data on Windows standard streams - #320
Open
Alb3e3 wants to merge 1 commit into
Open
Conversation
Alb3e3
force-pushed
the
fix/windows-binary-streams
branch
from
September 7, 2026 21:16
9c21bb4 to
14ebf28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows, stdin and stdout default to CRT text mode, while named plist files
are opened in binary mode. A valid binary plist containing CR/LF or Ctrl-Z can
therefore fail to parse from stdin; binary output written to stdout can also
gain carriage-return bytes and become invalid.
Set binary mode before reading stdin and before writing converted plist data
to stdout. Add a regression that compares standard-stream conversions with
named-file conversions using a plist containing CR, LF, and Ctrl-Z data bytes.
The test covers explicit and implicit standard streams, pipes, and print mode.
Related to #254. The report does not include its original input, but the new
fixture reproduces its stdin parse error on current master.
Validation: the regression fails before the fix and passes afterward with
MinGW-w64 GCC 12.2 under Wine 8.0. Full Linux
make checkpasses all 43 tests.Native Windows/MSYS2 execution remains for CI.
Developed with AI assistance; the patch was reviewed and tested locally.